<?php $translate = new Front_Model_Translate(); 
$model = new Administrator_Model_Product_View ();
?>
<div class="box head">
<div class="top">
<div class="logo"><a href="<?php echo BASE_URL?>/"><img
	src="<?php echo $dirimg?>/vic_web.png" title="Vietincom Store"></a></div>
<div class="topadv"><a href="<?php echo BASE_URL?>/"><img
	src="<?php echo $dirimg?>/topadv.png" title="Vietincom Store"></a></div>
<!-- <a class="cart" href=""#>Giỏ hàng <span class="count">(0)</span></a>  -->
</div>
<div class="menu">
<ul class="mainmenu">
	<li class="1"><a href="<?php echo BASE_URL?>/">Trang chủ</a></li>
	<li class="active 2"><a href="#">Sản phẩm</a></li>
	<li class="3"><a href="#">Khuyến mãi</a></li>
	<li class="4"><a href="#">Khách hàng</a></li>
	<li class="5"><a href="#">Thanh toán</a></li>
	<li class="6"><a href="#">Hỗ trợ</a></li>
</ul>
<div class="seach">
<div class="seachbox"><input id="xxx" type="text" name="seach"
	value="Nhập từ khóa ..."> <input type="submit" value="Tìm kiếm"
	class="buttonSearch">
<div class="search_form">
<div class="element">
<div class="xxleft"><label>Giá từ </label> <select class="nhucnach"
	name="pricefrom" style="width: 100px">
	<option value="0">3.000.000</option>
	<option value="0">4.000.000</option>
	<option value="0">5.000.000</option>
</select></div>
<div class="xxright"><label>Giá đến</label> <select class="nhucnach"
	name="priceto">
	<option value="0">7.000.000</option>
	<option value="0">8.000.000</option>
	<option value="0">9.000.000</option>
</select></div>
</div>
<div class="element">
<div class="xxleft"><select class="nhucnach" name="type" style="width: 141px;">
	<option value="0">Loại sản phẩm</option>
	<?php
	foreach ( $model->GetAllProduct_type () as $value ) {
		echo '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
	}
	?>
</select></div>
<div class="xxright">

<select class="nhucnach" name="manufact">
	<option value="0">Tất cả các hãng</option>
	<?php
	foreach ( $model->GetAllProduct_manufact () as $value ) {
		echo '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
	}
	?>
</select></div>
</div>
<div class="element">
<div class="xxleft"><select class="nhucnach" name="cat"
	style="width: 141px">
	<option value="0">Tất cả danh mục</option>
	<?php
	foreach ( $model->GetAllPro_cat () as $value ) {
		echo '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
	}
	?>
</select></div>
<button id="closed" style="float: left;">Đóng[x]</button>
<div class="xxright"><select class="nhucnach" name="store">
	<option value="0">Tất cả Store</option>
	<?php
	foreach ( $model->GetAllPro_store () as $value ) {
		echo '<option value="' . $value ['id'] . '">' . $value ['name'] . '</option>';
	}
	?>
</select></div>
</div>
</div>
</div>
</div>
</div>
<div class="submenu">

		<ul class="1" style="display: none;">
			<li><a href="#">Giới thiệu</a></li>
			<li><a href="#">Dịch vụ</a></li>
			<li><a href="#">Đối tác</a></li>
		</ul>
		<ul class="2 smenu">
			<li><a href="#">Máy chủ</a>
				<div class="sub">
			<?php
			foreach ( $model->GetAllProduct_typeByStore ( '2' ) as $value ) {
				echo '<div class="col  ">';
				echo '<h4 class="title">' . $value ['name'] . '</h4>';
				echo '<ul>';
				foreach ( $model->GetAllPro_catByTye ( $value ['id'] ) as $array ) {
					echo '<li><a href="'.$translate->ProCatLink($array ['id'], $request['lang']).'">' . $array ['name'] . '</a></li>';
				}
				echo '</ul>';
				echo '</div>';
			}
			?>
			</div></li>
			<li><a href="#">Hệ Thống lưu trữ</a></li>
			<li><a href="#">Thiết bị mạng</a></li>
			<li><a href="#">Máy tính</a>
			<div class="sub maytinh">
			<?php
			foreach ( $model->GetAllProduct_typeByStore ( '3' ) as $value ) {
				echo '<div class="col  ">';
				echo '<h4 class="title">' . $value ['name'] . '</h4>';
				echo '<ul>';
				foreach ( $model->GetAllPro_catByTye ( $value ['id'] ) as $array ) {
					echo '<li><a href="'.$translate->ProCatLink($array ['id'], $request['lang']).'">' . $array ['name'] . '</a></li>';
				}
				echo '</ul>';
				echo '</div>';
			}
			?>
			</div></li>
			<li><a href="#">Thiết bị văn phòng</a></li>
			<li><a href="#">Thiết bị ngoại vi</a>
			<div class="sub ngoaivi">
			<?php
			foreach ( $model->GetAllProduct_typeByStore ( '4' ) as $value ) {
				echo '<div class="col  ">';
				echo '<h4 class="title">' . $value ['name'] . '</h4>';
				echo '<ul>';
				foreach ( $model->GetAllPro_catByTye ( $value ['id'] ) as $array ) {
					echo '<li><a href="'.$translate->ProCatLink($array ['id'], $request['lang']).'">' . $array ['name'] . '</a></li>';
				}
				echo '</ul>';
				echo '</div>';
			}
			?>
			</div>
			</li>
			<li><a href="#">Camera</a>
			<div class="sub camera">
			<?php
			foreach ( $model->GetAllProduct_typeByStore ( '5' ) as $value ) {
				echo '<div class="col  ">';
				echo '<h4 class="title">' . $value ['name'] . '</h4>';
				echo '<ul>';
				foreach ( $model->GetAllPro_catByTye ( $value ['id'] ) as $array ) {
					echo '<li><a href="'.$translate->ProCatLink($array ['id'], $request['lang']).'">' . $array ['name'] . '</a></li>';
				}
				echo '</ul>';
				echo '</div>';
			}
			?>
			</div>
			</li>
			<li><a href="#">Thiết bị viễn thông</a></li>
			<li><a href="#">Phần mềm</a></li>
		</ul>
		<ul class="3" style="display: none;">
			<li><a href="#">Hot nhất</a></li>
			<li><a href="#">Mới nhất</a></li>
			<li><a href="#">Nhiều nhất</a></li>
		</ul>
		<ul class="4" style="display: none;">
			<li><a href="#">Axe</a></li>
			<li><a href="#">Ju</a></li>
			<li><a href="#">Vs</a></li>
			<li><a href="#">Pugna</a></li>
			<li><a href="#">Tus</a></li>
			<li><a href="#">Cen</a></li>
			<li><a href="#">Roshan</a></li>
		</ul>
		<ul class="5" style="display: none;">
			<li><a href="#">Thanh toán trước Online</a></li>
			<li><a href="#">Thanh toán trước Offline</a></li>
			<li><a href="#">Thanh toán sau</a></li>
		</ul>
		<ul class="6" style="display: none;">
			<li><a href="#">Dịch vụ</a></li>
			<li><a href="#">Kĩ thuật</a></li>
			<li><a href="#">Sản phẩm</a></li>
		</ul>
	</div>



</div>
<!-- end box -->
<script type="text/javascript">

$('#header .box .menu .mainmenu>li').hover(function(){
	$('#header .box .menu .mainmenu>li').removeClass('active');
	var temp = $(this).attr('class');
	$(this).addClass('active');
	$('#header .box .submenu>ul').removeClass('smenu');
	$('#header .box .submenu>ul').css('display','none');
	$('#header .box .submenu>.'+temp).addClass('smenu');
	$('#header .box .submenu>.'+temp).css('display','block');
});
$('#header .box .submenu>ul>li>.sub').hide();
$('#header .box .submenu>ul>li').hover(
	function(){
	$(this).css('box-shadow','0 5px 15px #A6A6A6');
	$(this).css('background','white');
	$(this).find('a:first').css('color','#f17f22');
	$(this).find('.sub').show();
	},
	function(){
		$(this).css('box-shadow','');
		$(this).css('background','#f17f22');
		$(this).find('a:first').css('color','white');
		$(this).find('.sub').hide();
	});


$('#header .box .menu .mainmenu>li').hover(function(){
	$('#header .box .menu .mainmenu>li').removeClass('active');
	var temp = $(this).attr('class');
	$(this).addClass('active');
	$('#header .box .submenu>ul').removeClass('smenu');
	$('#header .box .submenu>ul').css('display','none');
	$('#header .box .submenu>.'+temp).addClass('smenu');
	$('#header .box .submenu>.'+temp).css('display','block');
});















				
var xxx = "Nhập từ khóa ...";
$('#header .box  .menu .seach .search_form').hide();

	$('#header .box  .menu .seach .seachbox input#xxx').focus(function(){
		var temp = $('#header .box  .menu .seach .seachbox input#xxx').val();
		if(temp.toLowerCase() == xxx.toLowerCase()){
			$('#header .box  .menu .seach .seachbox input#xxx').val('');
		}
		$('#header .box  .menu .seach .search_form').show('slow');
		});
	
	/*$('#header .box  .menu .seach .search_form').focusout(function(){

		$('#header .box  .menu .seach .search_form').focusout(function(){
			var temp = $('#header .box  .menu .seach .seachbox input#xxx').val();
			$('#header .box  .menu .seach .search_form').hide('slow');
			if(temp.length == 0)
				$('#header .box  .menu .seach .seachbox input#xxx').val('Nhập từ khóa ...');
		});
	});*/
		$('#header .box  .menu .seach .search_form #closed').click(function(){
			var temp = $('#header .box  .menu .seach .seachbox input#xxx').val();
			$('#header .box  .menu .seach .search_form').hide('slow');
			if(temp.length == 0)
				$('#header .box  .menu .seach .seachbox input#xxx').val('Nhập từ khóa ...');
			});
</script>








